package com.permission.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.permission.beans.PageQuery;
import com.permission.entity.SysUser;

public interface SysUserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(SysUser record);

    int insertSelective(SysUser record);

    SysUser selectByPrimaryKey(Integer id);
    
    SysUser findByKeyword(@Param("keyword") String keyword);
    
    List<SysUser> getPageByDeptId(@Param("deptId") int deptId, @Param("page") PageQuery page);
    
    int countByMail(@Param("mail") String mail, @Param("id") Integer id);

    int countByTelephone(@Param("telephone") String telephone, @Param("id") Integer id);

    int countByDeptId(@Param("deptId") int deptId);
        
    int updateByPrimaryKeySelective(SysUser record);

    int updateByPrimaryKey(SysUser record);
    
    //根据用户ID集合获取用户集合
    List<SysUser> getByIdList(@Param("idList") List<Integer> idList);

    //获取所有用户
    List<SysUser> getAll();
}